const { reject, resolve } = require("bluebird");

function pick(){
  return new Promise((resolve, reject) => {
    setTimeout(()=>{
      console.log('收到信息',new Date());
      resolve();
  },500);
  })

}
function groundMouth(){
  return new Promise((resolve, reject) => {
    setTimeout(()=>{
      console.log('货物装载',new Date());
      resolve();
  },400);
  })
}
function blow(){
  return new Promise((resolve, reject) => {
    setTimeout(()=>{
      console.log('打包出仓',new Date());
      resolve();
  },300);
  })

}
function PEbag(){
  return new Promise((resolve, reject) => {
    setTimeout(()=>{
      console.log('集成装车',new Date());
      resolve();
  },200);
  })
}
function pack(){
  return new Promise((resolve, reject) => {
    setTimeout(()=>{
      console.log('发送运输',new Date());
      resolve();
  },100);
  })
}

pick()
  .then(groundMouth)
  .then(blow)
  .then(PEbag)
  .then(pack)

// pick(()=>{
//   groundMouth(()=>{
//       blow(()=>{
//           PEbag(()=>{
//               pack();
//           });
//       });
//   });
// });